BillGrid = Ext.extend(GridCtl, {

			getCmItems : function() {

				var items = [this.getCmItem('编号', 'id', true),
						this.getCmItem('createtime', 'createtime', false),
						this.getCmItem('userid', 'userid', false),
						this.getCmItem('状态', 'statusStr', true),
						this.getCmItem('类型', 'typeStr', true),
						this.getCmItem('协议单名称', 'proname', true),
						this.getCmItem('客户公司名称', 'customername', true),
						this.getCmItem('customerid', 'customerid', false),
						this.getCmItem('客户联系人', 'connectername', true),
						this.getCmItem('根协议单编号', 'rootid', true),
						this.getCmItem('项目区域', 'region', true),
						this.getCmItem('项目国家', 'country', true),
						this.getCmItem('项目城市', 'city', true),
						this.getCmItem('项目规模', 'size', true),
						this.getCmItem('签单币种', 'currency', true),
						this.getCmItem('签单日期 ', 'signdate', true),
						this.getCmItem('资料提供日期', 'dataRdyTime', true),
						this.getCmItem('完成日期', 'finishTime', true),
						this.getCmItem('销售员', 'userName', true),
						this.getCmItem('合同总金额本币', 'cost', true),
						this.getCmItem('合同总金额人民币', 'costRmb', true),
						this.getCmItem('制作具体要求', 'requirements', true)];
						
				return items;
			},
			configButtons : function(config) {
				
				return config;

			},
			getCommonConfig : function() {

				var gcc = cf.getC('gcc');

				var config = {
					region : 'center',
					height : 200
				};

				return config;

			},
			add : function() {

				var id = this.customerid;

				var cnfc = cf.getC('cnfc');
				cnfc.reset();

				var cnfwc = cf.getC('cnfwc');
				cnfwc.show(id);

			},
			edit : function() {

				var record = this.getSelectedRecord();
				if (!record) {
					alert('请先选择一条记录！');
					return;
				}

				var connectorid = record.get('id');

				var cnfc = cf.getC('cnfc');
				cnfc.reset();
				cnfc.load(connectorid);

				var id = this.customerid;
				var cnfwc = cf.getC('cnfwc');
				cnfwc.show(id);

			},
			load : function(id) {

				this.customerid = id;
				
				var store = this.store;
				store.baseParams = {
					customerid : id,
					by : 'customerid'
				};
				store.load();

			},
			getStoreUrl : function() {

				var resource = 'contract.do';
				var server = cf.getC('s');
				var url = server.getUrl({
							resource : resource,
							act : 'select'
						});
				return url;
			}

		});
